package it.slkfarm.log;

import java.text.SimpleDateFormat;
import java.util.Date;

public class LogData 
{
	/**
	 * @uml.property  name="date"
	 */
	private String date;
	/**
	 * @uml.property  name="logClass"
	 */
	private String logClass;
	/**
	 * @uml.property  name="action"
	 */
	private String action;
	/**
	 * @uml.property  name="result"
	 */
	private String result;
	
	public LogData(String logClass, String action, String result)
	{
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy - HH:mm:ss");
        date = sdf.format(new Date());
        this.logClass = logClass;
        this.action = action;
        this.result = result;
	}
	
	public String getLog()
	{
		String log = "";
		log = log + date + " - CLASS: " + logClass + " - ACTION: " + action + " - RESULT: " + result + "\r\n";
		return log;
	}
}
